<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Conversion</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="kvaser.gif"/></td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__kvaxml__conversion.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Conversion<div class="ingroups"><a class="el" href="group__grp__kvaxml.html">kvaMemoLibXML</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga3e94f83e8f6bdd988f215dd7af7b1b64"><td class="memItemLeft" align="right" valign="top"><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194">KvaXmlStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kvaxml__conversion.html#ga3e94f83e8f6bdd988f215dd7af7b1b64">kvaXmlToBuffer</a> (const char *xmlbuf, unsigned int xmllen, char *outbuf, unsigned int *outlen, long *version)</td></tr>
<tr class="separator:ga3e94f83e8f6bdd988f215dd7af7b1b64"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9c30a72338dd62a50015b852403a0f11"><td class="memItemLeft" align="right" valign="top"><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194">KvaXmlStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kvaxml__conversion.html#ga9c30a72338dd62a50015b852403a0f11">kvaXmlToFile</a> (const char *infile, const char *outfile)</td></tr>
<tr class="separator:ga9c30a72338dd62a50015b852403a0f11"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae8de06f7538a65ccb07df301ea663c50"><td class="memItemLeft" align="right" valign="top"><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194">KvaXmlStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kvaxml__conversion.html#gae8de06f7538a65ccb07df301ea663c50">kvaFileToXml</a> (const char *parfile, const char *xmlfile)</td></tr>
<tr class="separator:gae8de06f7538a65ccb07df301ea663c50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gafe1b337165ebfa64edf379be0880ef26"><td class="memItemLeft" align="right" valign="top"><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194">KvaXmlStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kvaxml__conversion.html#gafe1b337165ebfa64edf379be0880ef26">kvaXmlDebugOutput</a> (int on)</td></tr>
<tr class="separator:gafe1b337165ebfa64edf379be0880ef26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga873dd9799d37c23e5cb84d92bcda52df"><td class="memItemLeft" align="right" valign="top"><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194">KvaXmlStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kvaxml__conversion.html#ga873dd9799d37c23e5cb84d92bcda52df">kvaBufferToXml</a> (const char *inbuf, unsigned int inlen, char *xmlbuf, unsigned int *xmllen, long *version, const char *scriptpath)</td></tr>
<tr class="separator:ga873dd9799d37c23e5cb84d92bcda52df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadb412c28b011db9ac7026a1f817dd7cc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194">KvaXmlStatus</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__kvaxml__conversion.html#gadb412c28b011db9ac7026a1f817dd7cc">kvaXmlGetErrorText</a> (<a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194">KvaXmlStatus</a> status, char *buf, unsigned int len)</td></tr>
<tr class="separator:gadb412c28b011db9ac7026a1f817dd7cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga873dd9799d37c23e5cb84d92bcda52df"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga873dd9799d37c23e5cb84d92bcda52df">&#9670;&nbsp;</a></span>kvaBufferToXml()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194">KvaXmlStatus</a> kvaBufferToXml </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>inbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>inlen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>xmlbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int *&#160;</td>
          <td class="paramname"><em>xmllen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long *&#160;</td>
          <td class="paramname"><em>version</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>scriptpath</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Convert a buffer containing param.lif with size inlen to a new XML settings buffer xmlbuf with length xmllen. The version of the XML settings is returned in version (Upper 16 bits: major, lower 16 bits: minor). Scripts from the param.lif will be written to the directory specified in scriptpath.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">inbuf</td><td>Buffer containing the param.lif settings. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">inlen</td><td>Size of param.lif buffer in bytes. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">xmlbuf</td><td>Buffer to receive the XML settings. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">xmllen</td><td>Size of the XML buffer in bytes. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">version</td><td>XML version. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">scriptpath</td><td>Path to destination of scripts.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194ad2b6169996c365eb50254be8362c2cb8">KvaXmlStatusOK</a> (zero) if success. </dd>
<dd>
<a class="el" href="kva_memo_lib_x_m_l_8h.html#KvaXmlStatusERR_XXX">KvaXmlStatusERR_XXX</a> (negative) if failure. </dd></dl>

</div>
</div>
<a id="gae8de06f7538a65ccb07df301ea663c50"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gae8de06f7538a65ccb07df301ea663c50">&#9670;&nbsp;</a></span>kvaFileToXml()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194">KvaXmlStatus</a> kvaFileToXml </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>parfile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>xmlfile</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Convert the binary settings from parfile and write the XML settings to xmlfile.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">parfile</td><td>Path and name of the file containing the param.lif settings. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">xmlfile</td><td>Path and name of the file to receive the XML settings.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194ad2b6169996c365eb50254be8362c2cb8">KvaXmlStatusOK</a> (zero) if success. </dd>
<dd>
<a class="el" href="kva_memo_lib_x_m_l_8h.html#KvaXmlStatusERR_XXX">KvaXmlStatusERR_XXX</a> (negative) if failure. </dd></dl>

</div>
</div>
<a id="gafe1b337165ebfa64edf379be0880ef26"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gafe1b337165ebfa64edf379be0880ef26">&#9670;&nbsp;</a></span>kvaXmlDebugOutput()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194">KvaXmlStatus</a> kvaXmlDebugOutput </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>on</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Enable detailed information about the XML conversion on standard out. This can be very useful when the error that causes the failure is masked by subsequent errors.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">on</td><td>Enable debug output if non-zero.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194ad2b6169996c365eb50254be8362c2cb8">KvaXmlStatusOK</a> (zero) if success. </dd>
<dd>
<a class="el" href="kva_memo_lib_x_m_l_8h.html#KvaXmlStatusERR_XXX">KvaXmlStatusERR_XXX</a> (negative) if failure. </dd></dl>

</div>
</div>
<a id="gadb412c28b011db9ac7026a1f817dd7cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gadb412c28b011db9ac7026a1f817dd7cc">&#9670;&nbsp;</a></span>kvaXmlGetErrorText()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194">KvaXmlStatus</a> kvaXmlGetErrorText </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194">KvaXmlStatus</a>&#160;</td>
          <td class="paramname"><em>status</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Get a human readable description of error with supplied error code.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">status</td><td><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194">KvaXmlStatus</a> error code. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">buf</td><td>Buffer to receive error message. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>Buffer size in bytes.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194ad2b6169996c365eb50254be8362c2cb8">KvaXmlStatusOK</a> (zero) if success. </dd>
<dd>
<a class="el" href="kva_memo_lib_x_m_l_8h.html#KvaXmlStatusERR_XXX">KvaXmlStatusERR_XXX</a> (negative) if failure. </dd></dl>

</div>
</div>
<a id="ga3e94f83e8f6bdd988f215dd7af7b1b64"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga3e94f83e8f6bdd988f215dd7af7b1b64">&#9670;&nbsp;</a></span>kvaXmlToBuffer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194">KvaXmlStatus</a> kvaXmlToBuffer </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>xmlbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int&#160;</td>
          <td class="paramname"><em>xmllen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>outbuf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned int *&#160;</td>
          <td class="paramname"><em>outlen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long *&#160;</td>
          <td class="paramname"><em>version</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Convert the XML settings from buffer xmlbuf with length xmllen. The resulting param.lif is written to the buffer outbuf and has length outlen. Use the macro PARAMLIF_SIZE to allocate the ouput buffer to ensure that it is sufficiently large. The version of the XML settings is returned in version (Upper 16 bits: major, lower 16 bits: minor).</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">xmlbuf</td><td>Buffer containing the XML settings. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">xmllen</td><td>Size of the XML buffer in bytes. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">outbuf</td><td>Buffer to receive the param.lif settings. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">outlen</td><td>Size of the param.lif buffer in bytes. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">version</td><td>XML version.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194ad2b6169996c365eb50254be8362c2cb8">KvaXmlStatusOK</a> (zero) if success. </dd>
<dd>
<a class="el" href="kva_memo_lib_x_m_l_8h.html#KvaXmlStatusERR_XXX">KvaXmlStatusERR_XXX</a> (negative) if failure. </dd></dl>

</div>
</div>
<a id="ga9c30a72338dd62a50015b852403a0f11"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga9c30a72338dd62a50015b852403a0f11">&#9670;&nbsp;</a></span>kvaXmlToFile()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194">KvaXmlStatus</a> kvaXmlToFile </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>infile</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>outfile</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Convert the XML settings from infile and write the binary settings to outfile.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">infile</td><td>Path and name of the file containing the XML settings. </td></tr>
    <tr><td class="paramdir">[out]</td><td class="paramname">outfile</td><td>Path and name of the file to receive the param.lif settings.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="kva_memo_lib_x_m_l_8h.html#a668c1e6df525480097a3b0af4a516194ad2b6169996c365eb50254be8362c2cb8">KvaXmlStatusOK</a> (zero) if success. </dd>
<dd>
<a class="el" href="kva_memo_lib_x_m_l_8h.html#KvaXmlStatusERR_XXX">KvaXmlStatusERR_XXX</a> (negative) if failure. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- HTML footer for doxygen 1.8.13-->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer"> (canlib 5.38) Tue Feb 15 2022</li>
  </ul>
</div>
</body>
</html>
